//@ts-ignore
import request from "@/utils/request.ts";

export function getOrderInfo(orderId: string) {
    return request.get(`/order/orderInfo/auth/getOrderInfo/${orderId}`)
}

export function cancelOrder(orderId: string) {
    return request.get(`/order/orderInfo/auth/cancelOrder/${orderId}`)
}

export function qrCodeWx(orderId: string) {
    return request.get(`/order/weixin/createNative/${orderId}`)
}

export function getPayStatus(orderId: string) {
    return request.get(`/order/weixin/queryPayStatus/${orderId}`)
}

export function getAuthFlag() {
    return request.get("/user/auth/getUserInfo")
}

export function addAuthInfo(userParam: any) {
    return request.post("/user/auth/userAuah", userParam)
}


//获取订单状态
export function getOrderStatus() {
    return request.get("/order/orderInfo/auth/getStatusList")
}

//获取就诊人信息
export function getPatientInfo() {
    return request.get("/user/patient/auth/findAll")
}

//获取订单详情数据
export function getOrderDetailInfo() {
    return request.get("/order/orderInfo/auth/getOrderInfo")
}

//获取订单列表数据
export function getOrderList(page: number, limit: number, patientId: string, orderStatus: string) {
    return request.get(`/order/orderInfo/auth/${page}/${limit}?patientId=${patientId}&orderStatus=${orderStatus}`)
}
